package com.youhome.service.service;

import com.github.pagehelper.PageInfo;
import com.youhome.common.exception.CustomException;
import com.youhome.service.model.BMessage;
import com.youhome.service.model.Principal;
import com.youhome.service.parameter.ParamMessageSend;

import java.util.List;

/**
 * Created by chen365 on 2017/12/4.
 */
public interface BMessageService {

    int send(Long sender, List<String> receivers, String title, String content);

    PageInfo<BMessage> selectByBean(Integer page, Integer pageSize, BMessage record);

    PageInfo<BMessage> selectByBean(Principal principal,Integer status, Integer page, Integer pageSize) throws CustomException;

    int selectCount(BMessage message);

    BMessage selectByPrimaryKeyAndReceiver(BMessage record);

    int deleteByPrimaryKey(Long id);

    int deleteByBean(BMessage record);

    int update(BMessage message);

    int updateStatus(BMessage message);

    BMessage selectByPrimaryKey(Long id) throws CustomException;

    int updateByPrimaryKeySelective(BMessage message);

    void send(Principal principal,ParamMessageSend map) throws CustomException;

    int selectCount(Principal principal, Integer status) throws CustomException;

    void delete(Principal principal, Long id, Integer type) throws CustomException;

    void updateStatus(Principal principal, Long id, Integer status) throws CustomException;
}
